perm filename CCLOCK.DON[UP,DOC] blob sn#770726 filedate 1984-09-30 generic text, type T, neo UTF8
CCLOCK is a chess-clock program.  It runs only on DataDiscs.  To use,

	R CCLOCK;x,y

where x and y are the number of minutes to put on the left and right
clocks, respectively.  (If only one number is given, it is used for
both clocks.)  The program gives all further instructions.  When time
runs out on either clock, the program will stop the clocks and switch
the terminal's audio channel to channel 17 (breedle).  At that point,
typing any character results in a clean exit.

The clocks are displayed in both digital and analog form.  Since the
analog display involves a significant amount of overhead to display,
it is updated only when the running clock hits a five-second mark or
is stopped.  The analog display is updated each second when the
running clock has fewer than fifteen seconds left.

If the digital display is sufficient for your purposes, you can delete
the circular clocks by including a "D" in your command line, as in

	R CCLOCK;15D

which tells CCLOCK to include only the digital display.  If you want
to suppress the breedle when a clock runs out, and allow the other
clock to keep running (this is usually the case when playing "speed
chess"), you can tell CCLOCK to be silent by including an "S", as in

	R CCLOCK;5S

In this mode, a clock which reaches zero will not be updated further,
but the other clock will continue to run as appropriate (depending on
who last hit a key).  If both clocks hit zero, CCLOCK will just sit
there; the only exit in this mode is via control-meta-E.

CCLOCK should be accurate to within a tenth of a second across any
length of time.  If the system pauses and continues, the timing will
still be accurate (though, of course, it will be impossible to change
which clock is running while the system is stopped).